<template>
	<view class="category-box">
		<view v-for="item in categoryList" :key="item.id">
			{{item.name}}
		</view>
		<view>全部分类</view>
		<view class="empty"></view>
		<view class="empty"></view>
	</view>
</template>

<script>
	export default {
		props: {
			categoryList: {
				type: Array,
				default: () => [
					{
						id: 1,
						name: 'Java'
					},
					{
						id: 2,
						name: '运维'
					},
					{
						id: 3,
						name: 'Python'
					},
					{
						id: 4,
						name: 'JS'
					},
					{
						id: 5,
						name: '前端'
					},
					{
						id: 6,
						name: 'Php'
					},
					{
						id: 7,
						name: '移动端'
					},
				]
			}
		},
		data() {
			return {
				
			}
		},
		methods: {
			
		}
	}
</script>

<style lang="scss">
.category-box {
	display: flex;
	justify-content: space-between;
	flex-wrap: wrap;
	padding: 20rpx 30rpx 0 30rpx;
	> view {
	   width: 160rpx;
	   height: 70rpx;
	   text-align: center;
	   line-height: 70rpx;
	   font-size: 26rpx;
	   background-color: #f3f4f5;
	   border-radius: 20rpx;
	   overflow: hidden;
	   margin-top: 15rpx;
	   &.empty {
		   height: 0;
	   }
	}
}
</style>
